Container
The CROWN Container provides an associative container for storing all kind of CROWN datatypes in (like objects, strings, booleans etc.).
- Container.add(container, name, item, itemType)
- Arguments:
container (
Container)name (
string)item (
auto)itemType (
enum)
- Return type:
boolean
Adds an item to the container.
- Container.addConst(container, name, item, itemType)
- Arguments:
container (
Container)name (
string)item (
const auto)itemType (
enum)
- Return type:
boolean
Adds a const-item to the container.
- Container.exists(container, name)
- Arguments:
container (
Container)name (
string)
- Return type:
boolean
Checks, if an item with the provided key string exists in the container.
- Container.get(container, name, itemType)
- Arguments:
container (
Container)name (
string)itemType (
enum)
- Return type:
auto
Gets an item from the container.
- Container.getConst(container, name, itemType)
- Arguments:
container (
Container)name (
string)itemType (
enum)
- Return type:
const auto
Gets a const-item from the container.
- Container.getSize(container)
- Argument:
container (
Container)
- Return type:
int
Returns the number of items in the container.
- Container.getType(container, name)
- Arguments:
container (
Container)name (
string)
- Return type:
enum
Returns the type definition of the underlying type of item from the enum, as a string .
- Container.isEmpty(container)
- Argument:
container (
Container)
- Return type:
boolean
Checks, if the container is empty.
- Container.isSingle(container, name)
- Arguments:
container (
Container)name (
string)
- Return type:
boolean
Checks, if the item with the provided key string is a single instance, in opposite to a vector-valued instance.
- Container.isType(container, name, type)
- Arguments:
container (
Container)name (
string)type (
enum)
- Return type:
boolean
Checks, if the item with the specified key string is of the specified type.
- Container.isVector(container, name)
- Arguments:
container (
Container)name (
string)
- Return type:
boolean
Checks, if the item with the provided key string is a vector-valued instance, in opposite to a single instance.
- Container.list(container)
- Argument:
container (
Container)
- Return type:
string
Gets a list of all key names in the container, in alphabetical order.
- Container.remove(container, name)
- Arguments:
container (
Container)name (
string)
- Return type:
boolean
Removes an item from the container. If there is no item with the provided key string, nothing is done and false is returned.
- Container.toString(container)
- Argument:
container (
Container)
- Return type:
string
Returns a string representation of the content of the container.